
@w-switch:~"w-switch";

.@{w-switch} {
  vertical-align: middle;
  font-size: 12px;
  cursor: pointer;
  input[type=checkbox] {
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    min-width: 35px;
    height: 20px;
    background-clip: border-box;
    background-color: #dfdfdf;
    appearance: none;
    outline: 0;
    font-size: 12px;
    border-radius: 16px;
    transition: all .3s;
    box-shadow: inset 0 1px 2px rgba(16, 22, 26, 0.2);
    &:before, &:after {
      display: inline-block;
      vertical-align: middle;
    }
    &:before {
      content: attr(data-checked);
      transition: all .3s;
      padding: 0 21px 0 6px;
      color: #fff;
      margin-top: 1px;
    }
    &:checked {
      background-color: #008EF0;
      &:after {
        right: 2px;
        margin-right: 0;
      }
      &:before {
        content: attr(data-unchecked);
      }
    }
    &:not(:checked):before {
      padding: 0 6px 0 21px;
      color: #393E48;
    }
    &:after {
      content: ' ';
      position: absolute;
      margin-right: -18px;
      right: 100%;
      margin-top: 2px;
      margin-left: 1px;
      height: 16px;
      width: 16px;
      border-radius: 50%;
      transition: all .2s;
      background-color: #fff;
      box-shadow: 0 1px 2px 0 rgba(0,35,11,0.2);
    }
    &:disabled {
      cursor: not-allowed;
      opacity: .45;
    }
    &:focus {
      box-shadow: 0 0 0 2px rgba(0, 142, 240, 0.25), inset 0 1px 2px rgba(16, 22, 26, 0.2);
    }
  }
  &.disabled {
    cursor: not-allowed;
  }
  &-large {
    input[type=checkbox] {
      min-width: 38px;
      height: 24px;
      &::after {
        margin-right: -22px;
        height: 20px;
        width: 20px;
      }
      &:before {
        padding: 0 25px 0 8px;
        margin-top: 0;
        font-size: 16px;
      }
      &:not(:checked):before {
        padding: 0 8px 0 25px;
      }
    }
  }
  &-small {
    font-size: 12px;
    input[type=checkbox] {
      min-width: 15px;
      height: 16px;
      &::after {
        margin-right: -14px;
        height: 12px;
        width: 12px;
      }
      &:before {
        padding: 0 16px 0 6px;
        margin-top: -2px;
      }
      &:not(:checked):before {
        padding: 0 6px 0 16px;
      }
    }
  }
  &-text, input[type=checkbox] {
    vertical-align: middle;
  }
  &-text {
    display: inline-block;
    margin-left: 5px;
  }
}
